Skip to content

Conversation

@aaccensi
Copy link
Contributor

Description

Adds the capability to interpolate between two scenarios with the API endpoint: POST /api/v3/scenarios/interpolate
Now if we pass a start_scenario_id besides the mandatory end_year it will interpolate using the values of the given start scenario instead of the starting values of the scenario targeted by the endpoint.

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist

  • I have tested these changes
  • I have updated documentation as needed (Work in progress)
  • I have tagged the relevant people for review

Related Issues

Closes #1684

@aaccensi aaccensi requested a review from louispt1 December 17, 2025 08:18
@aaccensi aaccensi force-pushed the scenario-interpolation branch from 8fe07d1 to 654db5d Compare December 17, 2025 08:19
Copy link
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Especially on the specs! Thank you for adding the extra spec for the API as well.

It works well as an extension of the existing code. I do think we can win some space by replacing the now many validators by introducing simple Dry validation rules. @louispt1 has been working with them a lot lately, he should be able to help you out.

Again well done!

Copy link
Contributor

@louispt1 louispt1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the one remark below and the spec for the batch endpoint I'd say it's looking good!

@aaccensi aaccensi requested a review from louispt1 December 30, 2025 11:03
Copy link
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of Dry and the rulesets went well. Thanks for trying it out!

There are a few optimizations to be made regarding Rails. You can check my comments in the code. If you need any more explanations or resources, please ask!

@aaccensi aaccensi force-pushed the scenario-interpolation branch from 7ac3dae to 027abdb Compare January 12, 2026 14:01
@aaccensi aaccensi requested a review from noracato January 13, 2026 08:43
@louispt1 louispt1 merged commit 52f9ee8 into master Jan 14, 2026
1 check passed
@louispt1 louispt1 deleted the scenario-interpolation branch January 14, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interpolate between two scenarios

4 participants